package com.cyjf.biz.impl;

import com.cyjf.biz.service.TradeService;
import com.cyjf.dbview.bo.ProvinceBO;
import com.cyjf.dbview.bo.TradeBO;
import com.cyjf.dbview.mapper.ZscarProvincesMapper;
import com.cyjf.dbview.mapper.ZscarSalesOrderPaymentdocumentMapper;
import com.cyjf.util.ResultVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("tradeService")
@Slf4j
public class TradeServiceImpl  implements TradeService {

    @Resource
    private ZscarSalesOrderPaymentdocumentMapper zscarSalesOrderPaymentdocumentMapper;



    @Override
    public ResultVO tradeAmount() {
        ResultVO<TradeBO> resultVO = new ResultVO();
        TradeBO  tradeBO = new TradeBO();
       Float yesterdayTrade = zscarSalesOrderPaymentdocumentMapper.getYesterdayTrade();
        tradeBO.setYesterdayTrade(yesterdayTrade);

        Float recent7Days = zscarSalesOrderPaymentdocumentMapper.getRecent7Days();
        tradeBO.setRecent7Days(recent7Days);

        float curMonth = zscarSalesOrderPaymentdocumentMapper.getCurMonth();
        tradeBO.setCurMonth(curMonth);

        float curYear= zscarSalesOrderPaymentdocumentMapper.getCurYear();
        tradeBO.setCurYear(curYear);

        float accumulative= zscarSalesOrderPaymentdocumentMapper.accumulative();
        tradeBO.setAccumulative(accumulative);


        resultVO.setData(tradeBO);
        return resultVO;
    }


}
